
// the class is some major information in game, use for BOT
public class GameStatus {
	int mapSizeX, mapSizeY;
	int playerPosX, playerPosY;
	int enemyPosX,enemyPosY;
	int remainEnemy;
	int direction;
	
	public GameStatus() {
		enemyPosX = enemyPosY = -1;
	}
	
	public boolean equals(GameStatus obj) {
		if (obj.mapSizeX == mapSizeX && obj.mapSizeY == mapSizeY) {
			if (obj.playerPosX == playerPosX && obj.playerPosY == playerPosY) {
				if (obj.enemyPosX == enemyPosX && obj.enemyPosY == enemyPosY) {
					if (obj.direction == direction && obj.remainEnemy == remainEnemy) {
						return true;
					}
				}
			}
		}
		return false;
	}
	
	public int hashCode() {
		String str = Integer.toString(mapSizeX) + "|"
				+ Integer.toString(mapSizeY) + "|"
				+ Integer.toString(playerPosX) + "|"
				+ Integer.toString(playerPosY) + "|"
				+ Integer.toString(enemyPosX) + "|"
				+ Integer.toString(enemyPosY) + "|"
				+ Integer.toString(remainEnemy) + "|"
				+ Integer.toString(direction) + "|";
		return str.hashCode();
	}
	
}
